#ifndef MODEL_INVALID_NAME_ERROR_HPP
#define MODEL_INVALID_NAME_ERROR_HPP

#include "Model/CommonModelConfig.hpp"
#include <stdexcept>

namespace Model
{

/// \ingroup Model
/// \brief It is thrown when data validation is performed in model layer related operations and a name (e.g. case entity 
///		name) don't match name constraints.
class COMMON_MODEL_API InvalidNameError: public std::runtime_error
{
public:
	/// \brief It initializes the exception.
	/// \param invalidName the name that is invalid.
	/// \param message the error message.
	InvalidNameError( const NameString& invalidName, const std::string& message = std::string());

	/// \brief It gets the invalid name.
	const NameString& invalidName() const { return invalidName_; }

private:
	NameString invalidName_;
};


} // namespace Model

#endif // MODEL_INVALID_NAME_ERROR_HPP